package com.yonyou.pmclouds.operation;

import com.yonyou.pmclouds.basecom.entity.SuperVO;
import com.yonyou.pmclouds.workquality.entity.WorkqualityDetailVO;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * @author caihfm
 * @Description 质量标准
 * @date 2018/9/20 9:53
 */
@Data
@Table(name = "opr_ds_template_workquality")
public class WorkqualityVO extends SuperVO {

    @Id
    private String pkWorkquality;
    @Column(name = "pk_tenant", updatable = false)
    private String pkTenant;
    @Size(max = 50)
    @NotNull
    private String checkname;
    private String checktype;
    @Transient
    private String procedurename;
    private String pkProcedure;
    @Transient
    private WorkqualityDetailVO[] itemtabledata;

    @Column(name = "creator", updatable = false)
    private String creator;
    @Column(name = "creationtime", updatable = false)
    private Date creationtime;
    private String modifier;
    private Date modifytime;

    @Transient
    private String key;

    public String getKey() {
        return pkWorkquality;
    }

    @Transient
    private boolean used;

    @Transient
    private List<WorkqualityDetailVO> workqualityDetailVOS;

    public WorkqualityVO() {
    }

    public WorkqualityVO(String checkname, String pkTenant, String checktype) {
        this.checkname = checkname;
        this.pkTenant = pkTenant;
        this.checktype = checktype;
    }

    public WorkqualityVO(String checkname, List<WorkqualityDetailVO> workqualityDetailVOS) {
        this.checkname = checkname;
        this.workqualityDetailVOS = workqualityDetailVOS;
    }
}
